$(document).ready(function() {
	queryCenterListData();
});

function queryCenterListData() {
	$.ajax({
		type : 'post',
		url : pt.base + "pt/ureportfenlei/centerlistData.do",
		dataType : "json",
		data : {},
		success : function(result) {
			if (result.data == null) {
				return;
			}
			for (var i = 0; i < result.data.length; i++) {
				var report = result.data[i];
				var type = report.type;
				var name = report.name.substring(report.name.indexOf(":") + 1,
						report.name.indexOf("."));
				switch (type) {
				case "资源报表":
					$("#zyreport").append(
							"<p><span class='reportLink'>" + "<a href='"
									+ pt.base + "ureport/preview?_u="
									+ report.name + "' target='_blank'>" + name
									+ "</a></span><br/>");
					break;
				case "收费报表":
					$("#feereport").append(
							"<p><span class='reportLink'>" + "<a href='"
									+ pt.base + "ureport/preview?_u="
									+ report.name + "' target='_blank'>" + name
									+ "</a></span><br/>"

					);
					break;
				case "客服报表":
					$("#servicereport").append(
							"<p><span class='reportLink'>" + "<a href='"
									+ pt.base + "ureport/preview?_u="
									+ report.name + "' target='_blank'>" + name
									+ "</a></span><br/>"

					);
					break;
				}
			}

		}
	});

}